home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / vendor.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  3.7 KB  |  92 lines

  1. #ifndef __STD_LOC_VENDOR
  2. #define __STD_LOC_VENDOR
  3. #pragma option push -b -a4 -Vx- -Ve- -w-inl -w-aus -w-sig
  4.  
  5. /***************************************************************************
  6.  *
  7.  * vendor -- Vendor-supplied declarations for the Standard Library locale
  8.  *           classes.
  9.  *
  10.  * $Id: vendor,v 1.10 1996/10/02 01:48:00 smithey Exp $
  11.  *
  12.  ***************************************************************************
  13.  *
  14.  * (c) Copyright 1994, 1995 Rogue Wave Software, Inc.
  15.  * ALL RIGHTS RESERVED *
  16.  * The software and information contained herein are proprietary to, and
  17.  * comprise valuable trade secrets of, Rogue Wave Software, Inc., which
  18.  * intends to preserve as trade secrets such software and information.
  19.  * This software is furnished pursuant to a written license agreement and
  20.  * may be used, copied, transmitted, and stored only in accordance with
  21.  * the terms of such license and with the inclusion of the above copyright
  22.  * notice.  This software and information or any other copies thereof may
  23.  * not be provided or otherwise made available to any other person.
  24.  *
  25.  * Notwithstanding any other lease or license that may pertain to, or
  26.  * accompany the delivery of, this computer software and information, the
  27.  * rights of the Government regarding its use, reproduction and disclosure
  28.  * are as set forth in Section 52.227-19 of the FARS Computer
  29.  * Software-Restricted Rights clause.
  30.  *
  31.  * Use, duplication, or disclosure by the Government is subject to
  32.  * restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
  33.  * Technical Data and Computer Software clause at DFARS 252.227-7013.
  34.  * Contractor/Manufacturer is Rogue Wave Software, Inc.,
  35.  * P.O. Box 2328, Corvallis, Oregon 97339.
  36.  *
  37.  * This computer software and information is distributed with "restricted
  38.  * rights."  Use, duplication or disclosure is subject to restrictions as
  39.  * set forth in NASA FAR SUP 18-52.227-79 (April 1985) "Commercial
  40.  * Computer Software-Restricted Rights (April 1985)."  If the Clause at
  41.  * 18-52.227-74 "Rights in Data General" is specified in the contract,
  42.  * then the "Alternate III" clause applies.
  43.  *
  44.  ***************************************************************************
  45.  *
  46.  *
  47.  **************************************************************************/
  48.  
  49.  
  50. #include <rw/ctype>
  51. #include <rw/numeral>
  52.  
  53. #ifndef _RWSTD_NO_NAMESPACE
  54. namespace __rwstd {
  55. #endif
  56.  
  57. // --------------------------------------------------------
  58. // Implementation function template -- create_native_facet.
  59. // --------------------------------------------------------
  60.  
  61. // Vendors must specialize this inline function template for each facet of the
  62. // vendor-default native ("") locale that is different from the same facet of
  63. // the classic locale.  Each specialization should construct and return a new
  64. // instance of the requested native-behavior facet with an initial reference
  65. // count of 1 (not the default 0!).
  66.  
  67. // Note that a specialization for ctype<char> must always be provided, because
  68. // ctype<char> lacks a constructor with the signature used in the template.
  69.  
  70. inline ctype<char>* _RWSTDExport create_native_facet (ctype<char>*) {
  71.   return new ctype<char>(NULL,false,1);
  72. }
  73.  
  74. inline numpunct<char>* _RWSTDExport create_native_facet (numpunct<char>*) {
  75.   return new numpunct_byname<char>("",1);
  76. }
  77.  
  78. // The default template function for Facets not specialized above returns a
  79. // facet with classic-locale behavior.
  80.  
  81. template <class Facet>
  82. inline Facet* _RWSTDExport create_native_facet (Facet*) {
  83.   return create_named_facet((Facet*)0,"",(size_t)1);
  84. }
  85.  
  86. #ifndef _RWSTD_NO_NAMESPACE
  87. } // namespace __rwstd
  88. #endif
  89.  
  90. #pragma option pop
  91. #endif // __STD_LOC_VENDOR
  92.